cmake_minimum_required(VERSION 3.15)
project(xpmem)
message(STATUS "PROJECT_NAME is ${PROJECT_NAME}")
message(STATUS "PROJECT_BINARY_DIR is ${PROJECT_BINARY_DIR}")

include_directories("/home/yizimi/pmpi-allreduce/xpmem_ring/include")
SET(LIB_SOURCE libxpmem.cpp libpmpi.cpp)
add_library(xpmem ${LIB_SOURCE})
target_link_libraries(xpmem ${MPI_LIBRARIES})

SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})


# INSTALL(FILES utilsbox.h DESTINATION include)
INSTALL(TARGETS xpmem
    # 静态库安装位置
    ARCHIVE DESTINATION lib
    )